<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="p" uri="/WEB-INF/tld/pagination.tld"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
		<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath()%>/css/public.css">
		<script language="JavaScript" charset="UTF-8"
			src="<%=request.getContextPath()%>/js/public.js"></script>
		<script type="text/javascript" charset="UTF-8"
			src="<%=request.getContextPath()%>/js/validate.js"></script>
			<script type="text/javascript" src="<%=request.getContextPath()%>/js/sorttable.js"></script>
				<script type="text/javascript" charset="UTF-8" src="<%=request.getContextPath() %>/js/date1.js"></script>
	<script type="text/javascript" charset="UTF-8" src="<%=request.getContextPath() %>/js/date.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<s:form name="sellOrderListForm" action="getSellOrderByCondition.action" method="post" theme="simple">
<div id="info_all">
		<div id="info_top">
			销售订单管理
		</div>
		<!-- 主输入区 -->
		<!-- 功能按钮 -->
		<div id="btn">
			<input type="button" value="新增" onClick="addAction('showAddSellOrder')"
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
		    	<input type="button" value="修改" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="删除" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="上查" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="下查" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="审核" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="反审核" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="作废" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="反作废" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="生成" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="复制" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="明细" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="关闭" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
					<input type="button" value="反关闭" onClick=""
				onFocus="this.blur()" onMouseOver="this.className='btnover'"
				onmouseout="this.className='btnout'" class="btnsize" />
		</div>
		<div id="info_main">
			<!-- 查询栏 -->
			<div id="select">
				<hr>
				<table>
					<tr>
						<td width="60">
							单据编号
						</td>
						<td width="120">
							<input name="sellOrderModel.sellOrderCode" type="text" size="12" />
						</td>
						<td width="60">
							审核状态
						</td>
						<td width="120">
							<s:select name="sellOrderModel.isAuditing" list="#{'2':'全部','0':'未审核','1':'已审核'}"></s:select>
						</td>
						<td width="74px">
							购货单位
						</td>
						<td width="130px">
                            <s:hidden name="sellOrderModel.customerID" id="customerId" ></s:hidden>
							<s:textfield name="" size="12" id="customerName"></s:textfield>
						    <img src="images/kookup.gif" style="cursor:hand"  onclick="openWin('selectCustomer.action','Customer',750,700,0)">	
						</td>


						<td>
							销售方式
						</td>
						<td width="130px">
							<s:select list="#{'4':'全部','0':'现销','1':'赊销','2':'分期收款销售','3':'委托代销'}" name="sellOrderModel.sellTypeId"></s:select>
						</td>
					</tr>
					<tr>
						<td>
							交货方式
						</td>
						<td width="130px">
							<s:hidden name="sellOrderModel.deliverymethodID" id="deliveryMethodId"></s:hidden>
							<s:textfield name="" id="deliveryMethodName" size="12"></s:textfield>
							<img src="images/kookup.gif" style="cursor:hand"  onclick="openWin('selectMethod.action','deliveryMethod',750,700,0)">
						</td>
						<td>
							结算方式
						</td>
						<td>
							<s:hidden name="sellOrderModel.settlementId" id="settlementId"></s:hidden>
							<s:textfield name="" id="settlementName" size="12"></s:textfield>
							<img src="images/kookup.gif" style="cursor:hand"  onclick="openWin('selectSettlement.action','currency',750,700,0)">
						</td>
						<td>
							订单日期&nbsp;&nbsp;从
						</td>
						<td width="90px">
						  <s:textfield name="beginDate" size="12"  cssStyle="cursor:hand" onclick="calendar.setHook(this)"id="createDate"></s:textfield>
						</td>
						<td>到</td>
						<td><s:textfield name="endDate" size="12"  cssStyle="cursor:hand" onclick="calendar.setHook(this)"id="createDate"></s:textfield></td>
					</tr>
				</table>
			</div>
			<div class="sele">
				<input type="submit" value="查询" onFocus="this.blur()"
						onmouseover="this.className='btnover'"
						onmouseout="this.className='btnout'" id="btnsize" />
				<input type="reset" value="重置" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<hr>
			</div>
			<!-- 信息显示栏 -->
			<div id="info_info2">
				<table id="info_table" width="1540" cellspacing=1px cellpadding=1px
					class="sortable">
					<thead>
						<tr>
							<th>
								<input type="checkbox" onClick="selectAll()" />
							</th>
							<th width="90">
								审核状态
							</th>
							<th width="90">
								关闭状态
							</th>
							<th width="90">
								作废状态
							</th>
							<th width="90">
								日期
							</th>
							<th width="90">
								订单编号
							</th>
							<th width="100px">
								源单类型
							</th>
							<th width="100px">
								客户名称
							</th>
							<th width="100px">
								销售方式
							</th>
							<th width="100px">
								交货方式
							</th>
							<th width="100px">
								交货地点
							</th>
							<th width="90">
								结算方式
							</th>
							<th width="90">
								结算日期
							</th>
							<th width="70">
								主管
							</th>
							<th width="70">
								部门
							</th>
							<th width="80px">
								业务员
							</th>
							<th width="70">
								制单
							</th>
							<th width="80px">
								审核人
							</th>
							<th width="90">
								审核日期
							</th>
							<th width="100px">
								摘要
							</th>
						</tr>
					</thead>
					<tbody>
						<s:if test="!sellOrderDTOList.isEmpty">
							<s:iterator value="sellOrderDTOList"  status="status">
								<tr>
									<td>
										<s:checkbox name="rowlist" fieldValue="%{sellOrder.sellOrderId}" theme="simple" value="false" />
									</td>
									<td>
										<s:if test="sellOrder.isAuditing==0">未审核</s:if>
										<s:if test="sellOrder.isAuditing==1">已审核</s:if>&nbsp;
									</td>
									<td>
										<s:if test="sellOrder.isClosed==0">未关闭</s:if>
										<s:if test="sellOrder.isClosed==1">已关闭</s:if>&nbsp;
									</td>
									<td>
										<s:if test="sellOrder.isCancel==0">未作废</s:if>
										<s:if test="sellOrder.isCancel==1">已作废</s:if>&nbsp;
									</td>
									<td>
										<s:property value="sellOrder.createDate"/>&nbsp;
									</td>
									<td>
										<s:property value="sellOrder.sellOrderCode"/>&nbsp;
									</td>
									<td>
										<s:if test="sellOrder.sourceBillType==0">无</s:if>
										<s:if test="sellOrder.sourceBillType==1">销售报价单</s:if>&nbsp;
									</td>
									<td>
										<s:property value="customer.customerName"/>&nbsp;
									</td>
									<td>
										<s:if test="sellOrder.sellTypeId==0">现销</s:if>
										<s:if test="sellOrder.sellTypeId==1">赊销</s:if>
										<s:if test="sellOrder.sellTypeId==2">分期收款销售</s:if>
										<s:if test="sellOrder.sellTypeId==3">委托代销</s:if>
										<!--<s:property value="sellOrder.sellTypeId"/>-->&nbsp;
									</td>
									<td>
										<s:property value="deliverymethod.deliveryMethodName"/>&nbsp;
									</td>
									<td>
										<s:property value="deliveryAddress.deliveryAddressName"/>&nbsp;
									</td>
									<td>
										<s:property value="settlement.settlementName"/>&nbsp;
									</td>
									<td>
										<s:property value="sellOrder.settleDate"/>&nbsp;
									</td>
									<td>
									   <s:property value="manager.candiateName"/>&nbsp;
									</td>
									<td>
									<s:property value="department.departmentName"/>&nbsp;
									</td>
									<td>
									<s:property value="businesser.candiateName"/>&nbsp;
									</td>
									<td>
									<s:property value="sellOrder.makeBiller"/>&nbsp;
									</td>
									<td>
									<s:property value="sellOrder.auditinger"/>&nbsp;
									</td>
									<td>
									<s:property value="sellOrder.auditingDate"/>&nbsp;
									</td>
									<td>
									<s:property value="sellOrder.brief"/>&nbsp;
									</td>
								</tr>
							</s:iterator>
						</s:if>
					</tbody>
				</table>
	            	<div align="center">
							<font color="black"> 共<s:property value="page.total" />
								页 第 <s:property value="page.cpage" /> 页 <p:page
									cpage="%{page.cpage}" total="%{page.total}" url="%{page.url}" />
							</font>

					</div>
				<script language="javascript">  
						//("表格名称","奇数行背景","偶数行背景","点击后背景");
						 mouseclick("info_table","#ffffff","#ffffff","#e6f0fd");
						 //("表格名称","奇数行背景","偶数行背景");
						 //setcolor("t","#ffffff","#ffffff");
					</script>
			</div>
		</div>
	</div>
	</s:form>
</body>
</html>